/*
 * @Descripttion: vue and node-bs
 * @Author: weijunliang-jul
 * @Date: 2021-02-24 17:05:16
 * @LastEditors: weijunliang-jul
 * @LastEditTime: 2021-02-24 18:43:07
 */

import request from '@/utils/request'

// 获取所有通知
export function getAllNotice(pageNum, currPage) {
    return request({
        url: '/admin/getAllNotice',
        method: 'get',
        params: {
            pageNum: pageNum,
            currPage: currPage - 1,
        },
    })
}

// 查看通知
export function NoticeDetails(n_id) {
    return request({
        url: '/admin/NoticeDetails',
        method: 'get',
        params: {
            n_id: n_id
        },
    })
}

// 发布通知
export function announce(input, s, noticeContent) {
    return request({
        url: '/admin/announce',
        method: 'post',
        data: {
            title: input,
            classes: s,
            content: noticeContent,
        },
    })
}

// 删除通知
export function deleteNotice(n_id) {
    return request({
        url: '/admin/delNotice',
        method: "get",
        params: {
          n_id: n_id,
        }
    })
}
